package ystp.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import ystp.model.Kangjunyaowu;
import ystp.model.KangjunyaowuExample;

public interface KangjunyaowuMapper {

    List<Map<String, Object>> findPinzhongAll(@Param("xiangmuid") String ppxiangmuId,

                                              @Param("drugname") String ppdrugname,
                                              @Param("fenlei") String ppfenlei,
                                              @Param("jiyao") String ppjiyao,
                                              @Param("tongguopingjia") String pptongguopingjia,
                                              @Param("zhidaoyuanze") String ppzhidaoyuanze,
                                              @Param("jicaiyao") String ppjicaiyao,

                                              @Param("startindex") int ppStartIndex,
                                              @Param("pagesize") int ppPageSize);

    List<Map<String, Object>> findPinguiByPinzhong(@Param("xiangmuid") String ppxiangmuId,@Param("pinzhong")String ppPinzhongOne);

    List<Map<String, Object>> findPinguiResultByPinzhong(@Param("xiangmuid")String ppxiangmuId,
                                                         @Param("userid")String ppuserId,
                                                         @Param("pinzhong")String ppPinzhongOne,

                                                         @Param("drugname") String ppdrugname,
                                                         @Param("fenlei") String ppfenlei,
                                                         @Param("jiyao") String ppjiyao,
                                                         @Param("tongguopingjia") String pptongguopingjia,
                                                         @Param("zhidaoyuanze") String ppzhidaoyuanze,
                                                         @Param("jicaiyao") String ppjicaiyao);
    //List<Map<String, Object>> findPinguiResultByPinzhong(@Param("xiangmuid")String ppxiangmuId, @Param("userid")String ppuserId, @Param("pinzhong")String ppPinzhongOne);


    Object getPinzhongCount(@Param("xiangmuid") String ppxiangmuId,

                            @Param("drugname") String ppdrugname,
                            @Param("fenlei") String ppfenlei,
                            @Param("jiyao") String ppjiyao,
                            @Param("tongguopingjia") String pptongguopingjia,
                            @Param("zhidaoyuanze") String ppzhidaoyuanze,
                            @Param("jicaiyao") String ppjicaiyao,

                            @Param("startindex") int ppStartIndex,
                            @Param("pagesize") int ppPageSize);

    List<Map<String, Object>> findPinzhongAndPinguiByXiangmuId(@Param("xiangmuid") String mmxiangmuId);

    List<Map<String, Object>> findDaochuPinzhongAll(@Param("xiangmuid") String ppxiangmuId);

    List<Map<String, Object>> findFeileiByXiangmuId(@Param("xiangmuid") String ppxiangmuId);

    List<Map<String, Object>> findGuizebianhaoByXiangmuId(@Param("xiangmuid") String ppxiangmuId);

    int countByExample(KangjunyaowuExample example);

    int deleteByExample(KangjunyaowuExample example);

    int deleteByPrimaryKey(String id);

    int insert(Kangjunyaowu record);

    int insertSelective(Kangjunyaowu record);

    List<Kangjunyaowu> selectByExample(KangjunyaowuExample example);

    Kangjunyaowu selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") Kangjunyaowu record, @Param("example") KangjunyaowuExample example);

    int updateByExample(@Param("record") Kangjunyaowu record, @Param("example") KangjunyaowuExample example);

    int updateByPrimaryKeySelective(Kangjunyaowu record);

    int updateByPrimaryKey(Kangjunyaowu record);
}